package com.wp.design.create.singleton.hungrysingleton;

import java.io.*;
import java.lang.reflect.Constructor;

public class Test {
	public static void main(String[] args) throws Exception {
		HungrySingleton instence = HungrySingleton.getInstance();

		Class c = HungrySingleton.class;
		Constructor constructor = c.getDeclaredConstructor();
		constructor.setAccessible(true);
		HungrySingleton newInstence = (HungrySingleton)constructor.newInstance();
		System.out.println(instence);
		System.out.println(newInstence);
		System.out.println(newInstence == instence);
	}
}
